<?php
$username = @$_COOKIE['username'];

$sql = mysqli_connect("localhost", "wd", "123456", "wd");
if (!$sql) {
    die("连接数据失败！");
}
$stmt = mysqli_prepare($sql, "select nickname from register where username=?");

mysqli_stmt_bind_param($stmt, 's', $username);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
$rs = mysqli_fetch_assoc($result);
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link href="css/reset.css" rel="stylesheet" type="text/css"/>
        <link href="css/article.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <ul class="header">
            <li><a href="myindex.php" >首页</a><span>|</span></li>
            <li><a href="#">图片</a><span>|</span></li>
            <li><a href="#">文字</a><span>|</span></li>
            <li><a href="#">视频</a><span>|</span></li>
            <li><a href="article.php" style="background: linear-gradient(#ecf3f6,#fff)">发表文章</a><span>|</span></li>
            <li><a href="#">私信</a><span>|</span></li>
            <li><a href="#">设置</a><span>|</span></li>
            <li><a href="index.php">退出</a></li>
        </ul>
        <form action="article1.php" method="post">
            <h1>发布文章</h1>
            <p>标题：<input type="text" name="title" class="title"></p>
            <p>标签：<input type="text" name="label" class="label"></p>
            <p>分类： <select name="type" class="type"><option>图片</option><option>文字</option><option>视频</option></select></p>
            <div class="div">
                <!-- 加载编辑器的容器 -->
                <script id="container" name="content" type="text/plain">
                    这里写你的初始化内容
                </script>
                <!-- 配置文件 -->
                <script type="text/javascript" src="utf8-php/ueditor.config.js"></script>
                <!-- 编辑器源码文件 -->
                <script type="text/javascript" src="utf8-php/ueditor.all.js"></script>
                <!-- 实例化编辑器 -->
                <script type="text/javascript">
                    var ue = UE.getEditor('container');
                </script>
            </div>
            <h2><span>描述：</span><textarea name="describe" class="describe"></textarea></h2>
            <h3><input type="checkbox" name="if" class="if">匿名发布</h3>
            <button>提&nbsp;交</button>
        </form>

        <div class="data">
            <input type="text" placeholder="输入想要查找的内容">
            <button>查找</button>
            <p>欢迎你<span><?php echo $rs['nickname'] ?></span></p>
        </div>
        <ul class="friend">
            <h1><?php echo $rs['nickname'] ?>的好友<span>(50)</span><i>↓<b>显示全部</b></i></h1>
            <li></li>
        </ul>
        <ol>
            <h1>我的关注列表<span>(50)</span><i>↓</i><b>显示全部</b></h1>
            <li></li>
        </ol>
        <div class="right">
            <h1>邀请朋友加入</h1>
            <h2>把下面的网址发送给朋友</h2>
            <p>htp ://www.dsdlslflsdjlf.dsfsdkslf</p>
            <a href="">或者发 email 邀请朋友</a>
        </div>
        <!--                <ul class="footer">
                            <li><a href="#">关于我们</a><span>|</span></li>
                            <li><a href="#">帮助</a><span>|</span></li>
                            <li><a href="#">隐私声明 © 2008 All Rights Reserved&nbsp;京ICP备07017692号</a></li>
                        </ul>-->
        <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
        <script src="js/article.js" type="text/javascript"></script>
    </body>
</html>
